package euler.helper;

import java.io.Serializable;

public final class Pair<L, R> implements Serializable {

    private static final long serialVersionUID = -8880387225469098468L;
    public final L left;
    public final R right;

    public static <L, R> Pair<L, R> of(L left, R right) {
        return new Pair<L, R>(left, right);
    }

    public Pair(L left, R right) {
        this.left = left;
        this.right = right;
    }

    public L getLeft() {
        return this.left;
    }

    public R getRight() {
        return this.right;
    }

    @Override
    public String toString() {
    	return "(" + this.left + "," + this.right + ")";
    }
}
